/** Generate by swagger-axios-codegen */
// @ts-nocheck
/* eslint-disable */

/** Generate by swagger-axios-codegen */
/* eslint-disable */
// @ts-nocheck
import axiosStatic, { AxiosInstance, AxiosRequestConfig } from 'axios';
import axiosInstance from './axiosInstance';

export interface IRequestOptions extends AxiosRequestConfig {
  /**
   * show loading status
   */
  loading?: boolean;
  /**
   * display error message
   */
  showError?: boolean;
  /**
   * indicates whether Authorization credentials are required for the request
   * @default true
   */
  withAuthorization?: boolean;
}

export interface IRequestConfig {
  method?: any;
  headers?: any;
  url?: any;
  data?: any;
  params?: any;
}

// Add options interface
export interface ServiceOptions {
  axios?: AxiosInstance;
  /** only in axios interceptor config*/
  loading: boolean;
  showError: boolean;
}

// Add default options
export const serviceOptions: ServiceOptions = {
  axios: axiosInstance,
  loading: true,
  showError: true // 跨域请求时需要使用凭证
};

// Instance selector
export function axios(configs: IRequestConfig, resolve: (p: any) => void, reject: (p: any) => void): Promise<any> {
  if (serviceOptions.axios) {
    return serviceOptions.axios
      .request(configs)
      .then((res) => {
        resolve(res.data);
      })
      .catch((err) => {
        reject(err);
      });
  } else {
    throw new Error('please inject yourself instance like axios  ');
  }
}

export function getConfigs(method: string, contentType: string, url: string, options: any): IRequestConfig {
  const configs: IRequestConfig = {
    loading: serviceOptions.loading,
    showError: serviceOptions.showError,
    ...options,
    method,
    url
  };
  configs.headers = {
    ...options.headers,
    'Content-Type': contentType
  };
  return configs;
}

export const basePath = 'http://localhost:8101';

export interface IList<T> extends Array<T> {}
export interface List<T> extends Array<T> {}
export interface IDictionary<TValue> {
  [key: string]: TValue;
}
export interface Dictionary<TValue> extends IDictionary<TValue> {}

export interface IListResult<T> {
  items?: T[];
}

export class ListResultDto<T> implements IListResult<T> {
  items?: T[];
}

export interface IPagedResult<T> extends IListResult<T> {
  totalCount?: number;
  items?: T[];
}

export class PagedResultDto<T = any> implements IPagedResult<T> {
  totalCount?: number;
  items?: T[];
}

// customer definition
// empty

export class InterfaceInfoControllerService {
  /**
   * add
   */
  static addUsingPost(
    params: {
      /** interfaceInfoAddRequest */
      interfaceInfoAddRequest: InterfaceInfoAddRequest;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<string> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/info/add';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['interfaceInfoAddRequest'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
  /**
   * delete
   */
  static deleteUsingPost(
    params: {
      /** ids */
      ids: any | null[];
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<string> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/info/delete/[ids]';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['ids'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
  /**
   * pageQuery
   */
  static pageQueryUsingPost(
    params: {
      /** queryRequest */
      queryRequest: InterfaceInfoQueryRequest;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_Page_InterfaceInfo> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/info/list';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['queryRequest'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
  /**
   * pageQueryVO
   */
  static pageQueryVoUsingPost(
    params: {
      /** queryRequest */
      queryRequest: InterfaceInfoQueryRequest;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_Page_InterfaceInfoVO> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/info/list/vo';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['queryRequest'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
  /**
   * getByIdVO
   */
  static getByIdVoUsingGet(
    params: {
      /** id */
      id: number;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_InterfaceInfoVO> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/info/list/vo/{id}';
      url = url.replace('{id}', params['id'] + '');

      const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);

      axios(configs, resolve, reject);
    });
  }
  /**
   * getById
   */
  static getByIdUsingGet(
    params: {
      /** id */
      id: number;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_InterfaceInfo> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/info/list/{id}';
      url = url.replace('{id}', params['id'] + '');

      const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);

      axios(configs, resolve, reject);
    });
  }
  /**
   * update
   */
  static updateUsingPost(
    params: {
      /** updateRequest */
      updateRequest: InterfaceInfoUpdateRequest;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<string> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/info/update';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['updateRequest'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
}

export class UserControllerService {
  /**
   * addUser
   */
  static addUserUsingPost(
    params: {
      /** userAddRequest */
      userAddRequest: UserAddRequest;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_long> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/user/add';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['userAddRequest'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
  /**
   * deleteUser
   */
  static deleteUserUsingPost(
    params: {
      /** deleteRequest */
      deleteRequest: DeleteRequest;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_boolean> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/user/delete';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['deleteRequest'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
  /**
   * getUserById
   */
  static getUserByIdUsingGet(
    params: {
      /** id */
      id?: string;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_User> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/user/get';

      const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);
      configs.params = { id: params['id'] };

      axios(configs, resolve, reject);
    });
  }
  /**
   * getLoginUser
   */
  static getLoginUserUsingGet(options: IRequestOptions = {}): Promise<BaseResponse_LoginUserVO> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/user/get/login';

      const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);

      axios(configs, resolve, reject);
    });
  }
  /**
   * getUserVOById
   */
  static getUserVoByIdUsingGet(
    params: {
      /** id */
      id?: string;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_UserVO> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/user/get/vo';

      const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);
      configs.params = { id: params['id'] };

      axios(configs, resolve, reject);
    });
  }
  /**
   * listUserByPage
   */
  static listUserByPageUsingPost(
    params: {
      /** userQueryRequest */
      userQueryRequest: UserQueryRequest;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_Page_User> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/user/list/page';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['userQueryRequest'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
  /**
   * listUserVOByPage
   */
  static listUserVoByPageUsingPost(
    params: {
      /** userQueryRequest */
      userQueryRequest: UserQueryRequest;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_Page_UserVO> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/user/list/page/vo';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['userQueryRequest'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
  /**
   * userLogin
   */
  static userLoginUsingPost(
    params: {
      /** userLoginRequest */
      userLoginRequest: UserLoginRequest;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_LoginUserVO> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/user/login';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['userLoginRequest'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
  /**
   * userLogout
   */
  static userLogoutUsingPost(options: IRequestOptions = {}): Promise<BaseResponse_boolean> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/user/logout';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      axios(configs, resolve, reject);
    });
  }
  /**
   * userRegister
   */
  static userRegisterUsingPost(
    params: {
      /** userRegisterRequest */
      userRegisterRequest: UserRegisterRequest;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_long> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/user/register';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['userRegisterRequest'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
  /**
   * updateUser
   */
  static updateUserUsingPost(
    params: {
      /** userUpdateRequest */
      userUpdateRequest: UserUpdateRequest;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_boolean> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/user/update';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['userUpdateRequest'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
  /**
   * updateMyUser
   */
  static updateMyUserUsingPost(
    params: {
      /** userUpdateMyRequest */
      userUpdateMyRequest: UserUpdateMyRequest;
    } = {} as any,
    options: IRequestOptions = {}
  ): Promise<BaseResponse_boolean> {
    return new Promise((resolve, reject) => {
      let url = basePath + '/api/user/update/my';

      const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);

      let data = params['userUpdateMyRequest'];

      configs.data = data;

      axios(configs, resolve, reject);
    });
  }
}

/** BaseResponse_InterfaceInfoVO */
export interface BaseResponse_InterfaceInfoVO {
  /**  */
  code?: number;

  /**  */
  data?: InterfaceInfoVO;

  /**  */
  message?: string;
}

/** BaseResponse_InterfaceInfo */
export interface BaseResponse_InterfaceInfo {
  /**  */
  code?: number;

  /**  */
  data?: InterfaceInfo;

  /**  */
  message?: string;
}

/** BaseResponse_LoginUserVO */
export interface BaseResponse_LoginUserVO {
  /**  */
  code?: number;

  /**  */
  data?: LoginUserVO;

  /**  */
  message?: string;
}

/** BaseResponse_Page_InterfaceInfoVO */
export interface BaseResponse_Page_InterfaceInfoVO {
  /**  */
  code?: number;

  /**  */
  data?: Page_InterfaceInfoVO;

  /**  */
  message?: string;
}

/** BaseResponse_Page_InterfaceInfo */
export interface BaseResponse_Page_InterfaceInfo {
  /**  */
  code?: number;

  /**  */
  data?: Page_InterfaceInfo;

  /**  */
  message?: string;
}

/** BaseResponse_Page_UserVO */
export interface BaseResponse_Page_UserVO {
  /**  */
  code?: number;

  /**  */
  data?: Page_UserVO;

  /**  */
  message?: string;
}

/** BaseResponse_Page_User */
export interface BaseResponse_Page_User {
  /**  */
  code?: number;

  /**  */
  data?: Page_User;

  /**  */
  message?: string;
}

/** BaseResponse_UserVO */
export interface BaseResponse_UserVO {
  /**  */
  code?: number;

  /**  */
  data?: UserVO;

  /**  */
  message?: string;
}

/** BaseResponse_User */
export interface BaseResponse_User {
  /**  */
  code?: number;

  /**  */
  data?: User;

  /**  */
  message?: string;
}

/** BaseResponse_boolean */
export interface BaseResponse_boolean {
  /**  */
  code?: number;

  /**  */
  data?: boolean;

  /**  */
  message?: string;
}

/** BaseResponse_long */
export interface BaseResponse_long {
  /**  */
  code?: number;

  /**  */
  data?: string;

  /**  */
  message?: string;
}

/** DeleteRequest */
export interface DeleteRequest {
  /**  */
  id?: string;
}

/** InterfaceInfo */
export interface InterfaceInfo {
  /**  */
  createTime?: Date;

  /**  */
  createUserId?: string;

  /**  */
  description?: string;

  /**  */
  id?: string;

  /**  */
  isDelete?: number;

  /**  */
  method?: string;

  /**  */
  name?: string;

  /**  */
  requestHeader?: string;

  /**  */
  requestParams?: string;

  /**  */
  responseHeader?: string;

  /**  */
  status?: number;

  /**  */
  type?: string;

  /**  */
  updateTime?: Date;

  /**  */
  url?: string;
}

/** InterfaceInfoAddRequest */
export interface InterfaceInfoAddRequest {
  /**  */
  description?: string;

  /**  */
  method?: string;

  /**  */
  name?: string;

  /**  */
  requestHeader?: string;

  /**  */
  requestParams?: string;

  /**  */
  responseHeader?: string;

  /**  */
  url?: string;
}

/** InterfaceInfoQueryRequest */
export interface InterfaceInfoQueryRequest {
  /**  */
  createTime?: Date;

  /**  */
  createUserId?: string;

  /** 当前页码 */
  current?: number;

  /**  */
  description?: string;

  /**  */
  id?: string;

  /**  */
  method?: string;

  /**  */
  name?: string;

  /** 页面大小 */
  pageSize?: number;

  /** 排序字段 */
  sortField?: string;

  /** 排序顺序（默认升序） */
  sortOrder?: string;

  /**  */
  status?: number;

  /**  */
  url?: string;
}

/** InterfaceInfoUpdateRequest */
export interface InterfaceInfoUpdateRequest {
  /**  */
  description?: string;

  /** id */
  id: string;

  /**  */
  method?: string;

  /**  */
  name?: string;

  /**  */
  requestHeader?: string;

  /**  */
  requestParams?: string;

  /**  */
  responseHeader?: string;

  /**  */
  status?: number;

  /**  */
  url?: string;
}

/** InterfaceInfoVO */
export interface InterfaceInfoVO {
  /**  */
  description?: string;

  /**  */
  id?: string;

  /**  */
  method?: string;

  /**  */
  name?: string;

  /**  */
  requestHeader?: string;

  /**  */
  requestParams?: string;

  /**  */
  responseHeader?: string;

  /**  */
  status?: number;

  /**  */
  type?: string;

  /**  */
  url?: string;
}

/** LoginUserVO */
export interface LoginUserVO {
  /**  */
  createTime?: Date;

  /**  */
  id?: string;

  /**  */
  updateTime?: Date;

  /**  */
  userAvatar?: string;

  /**  */
  userName?: string;

  /**  */
  userProfile?: string;

  /**  */
  userRole?: string;
}

/** OrderItem */
export interface OrderItem {
  /**  */
  asc?: boolean;

  /**  */
  column?: string;
}

/** Page_InterfaceInfoVO */
export interface Page_InterfaceInfoVO {
  /**  */
  countId?: string;

  /**  */
  current?: string;

  /**  */
  maxLimit?: string;

  /**  */
  optimizeCountSql?: boolean;

  /**  */
  orders?: OrderItem[];

  /**  */
  pages?: string;

  /**  */
  records?: InterfaceInfoVO[];

  /**  */
  searchCount?: boolean;

  /**  */
  size?: string;

  /**  */
  total?: string;
}

/** Page_InterfaceInfo */
export interface Page_InterfaceInfo {
  /**  */
  countId?: string;

  /**  */
  current?: string;

  /**  */
  maxLimit?: string;

  /**  */
  optimizeCountSql?: boolean;

  /**  */
  orders?: OrderItem[];

  /**  */
  pages?: string;

  /**  */
  records?: InterfaceInfo[];

  /**  */
  searchCount?: boolean;

  /**  */
  size?: string;

  /**  */
  total?: string;
}

/** Page_UserVO */
export interface Page_UserVO {
  /**  */
  countId?: string;

  /**  */
  current?: string;

  /**  */
  maxLimit?: string;

  /**  */
  optimizeCountSql?: boolean;

  /**  */
  orders?: OrderItem[];

  /**  */
  pages?: string;

  /**  */
  records?: UserVO[];

  /**  */
  searchCount?: boolean;

  /**  */
  size?: string;

  /**  */
  total?: string;
}

/** Page_User */
export interface Page_User {
  /**  */
  countId?: string;

  /**  */
  current?: string;

  /**  */
  maxLimit?: string;

  /**  */
  optimizeCountSql?: boolean;

  /**  */
  orders?: OrderItem[];

  /**  */
  pages?: string;

  /**  */
  records?: User[];

  /**  */
  searchCount?: boolean;

  /**  */
  size?: string;

  /**  */
  total?: string;
}

/** User */
export interface User {
  /**  */
  createTime?: Date;

  /**  */
  id?: string;

  /**  */
  isDelete?: number;

  /**  */
  updateTime?: Date;

  /**  */
  userAccount?: string;

  /**  */
  userAvatar?: string;

  /**  */
  userName?: string;

  /**  */
  userPassword?: string;

  /**  */
  userProfile?: string;

  /**  */
  userRole?: string;
}

/** UserAddRequest */
export interface UserAddRequest {
  /**  */
  userAccount?: string;

  /**  */
  userAvatar?: string;

  /**  */
  userName?: string;

  /**  */
  userRole?: string;
}

/** UserLoginRequest */
export interface UserLoginRequest {
  /**  */
  userAccount?: string;

  /**  */
  userPassword?: string;
}

/** UserQueryRequest */
export interface UserQueryRequest {
  /** 当前页码 */
  current?: number;

  /**  */
  id?: string;

  /** 页面大小 */
  pageSize?: number;

  /** 排序字段 */
  sortField?: string;

  /** 排序顺序（默认升序） */
  sortOrder?: string;

  /**  */
  userName?: string;

  /**  */
  userProfile?: string;

  /**  */
  userRole?: string;
}

/** UserRegisterRequest */
export interface UserRegisterRequest {
  /**  */
  checkPassword?: string;

  /**  */
  userAccount?: string;

  /**  */
  userPassword?: string;
}

/** UserUpdateMyRequest */
export interface UserUpdateMyRequest {
  /**  */
  userAvatar?: string;

  /**  */
  userName?: string;

  /**  */
  userProfile?: string;
}

/** UserUpdateRequest */
export interface UserUpdateRequest {
  /**  */
  id?: string;

  /**  */
  userAvatar?: string;

  /**  */
  userName?: string;

  /**  */
  userProfile?: string;

  /**  */
  userRole?: string;
}

/** UserVO */
export interface UserVO {
  /**  */
  createTime?: Date;

  /**  */
  id?: string;

  /**  */
  userAvatar?: string;

  /**  */
  userName?: string;

  /**  */
  userProfile?: string;

  /**  */
  userRole?: string;
}
